package com.qhit.service.impl;

import com.qhit.dao.PermissionMappper;
import com.qhit.pojo.Permission;
import com.qhit.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionMappper permissionMapper;
    @Override
    public List<Permission> getList(HashMap hashMap) {
        return permissionMapper.getList(hashMap);

    }

    @Override
    public List<Permission> getList2() {
        return permissionMapper.getList2();
    }

    @Override
    public Long getListCount(HashMap hashMap) {
        return permissionMapper.getListCount(hashMap);
    }

    @Override
    public int add(Permission Permission) {
        return permissionMapper.add(Permission);
    }

    @Override
    public Permission getPermissionById(Integer id) {
        return permissionMapper.getPermissionById(id);
    }

    @Override
    public int edit(Permission Permission) {
        return permissionMapper.edit(Permission);
    }

    @Override
    public int delete(Integer id) {
        return permissionMapper.delete(id);
    }

    @Override
    public List<Permission> getPermissionByRoleId(int id) {
        return permissionMapper.getPermissionByRoleId(id);
    }


}
